package com.qf.controller;

import com.qf.annotation.RequiresPermissionsDesc;
import com.qf.util.ResponseUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lixu
 */
@RestController
@RequestMapping("/admin/stat")
@CrossOrigin
public class StatController {

    /**
     * ### 统计
     *
     * #### 2.4.1. 用户统计
     *
     * - 接口地址 : http://localhost:8083/admin/stat/user
     * - 下行数据 :
     */
    @RequiresPermissionsDesc(menu = {"统计","用户统计"},button = "查询")
    @RequiresPermissions(value = "admin:stat:user")
    @GetMapping("/user")
    public Object user(Integer page,Integer limit,String sort,String order,String username){
        return ResponseUtil.ok();
    }
    /**
     * ### 统计
     *
     * #### 2.4.2. 订单统计
     *
     * - 接口地址 : http://localhost:8083/admin/stat/order
     * - 下行数据 :
     */
    @RequiresPermissionsDesc(menu = {"统计","订单统计"},button = "查询")
    @RequiresPermissions(value = "admin:stat:order")
    @GetMapping("/order")
    public Object order(Integer page,Integer limit,String sort,String order,String username){
        return ResponseUtil.ok();
    }
    /**
     * ### 统计
     *
     * #### 2.4.3. 商品统计
     *
     * - 接口地址 : http://localhost:8083/admin/stat/goods
     * - 下行数据 :
     */
    @RequiresPermissionsDesc(menu = {"统计","商品统计"},button = "查询")
    @RequiresPermissions(value = "admin:stat:goods")
    @GetMapping("/goods")
    public Object goods(Integer page,Integer limit,String sort,String order,String username){
        return ResponseUtil.ok();
    }
}
